#分着读文件
f = None
try:
    f = open('readme.txt')
except FileNotFoundError:
    print("readme.txt不存在")
else:
    content = ""
    while True:
        line = f.read(5)
        if line=="":
            break
        content+=line
    print(content)

finally:
    if f:
        f.close()